package com.huang;

import java.io.File;
import java.io.IOException;

/**
 * @author HuangShen
 * @Description IO 流
 * @create 2021-03-24 18:58
 */
public class MyTest {


    public static void main(String[] args) throws IOException {
        File file = new File("hello.txt");
        System.out.println(file.getAbsolutePath());
        System.out.println(file.getParent());
        System.out.println(file.getName());
        System.out.println(file.lastModified());
        System.out.println(file.length());
        file.createNewFile();
        if (null==file){
            file.createNewFile();
        }

        File file1 = new File("E:\\后端代码");
        String[] list = file1.getAbsoluteFile().list();
        for (String s : list) {
            System.out.println(s);
        }


    }



    public void  init(){

    }
}
